<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>专业组三甲</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <!-- iphone safari -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <meta name="Author" contect="Mr.He"/>
    <link rel="apple-touch-icon" size="72x72" href="images/icon.png"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <link rel="stylesheet" type="text/css" href="css/renqi.css">
    <link rel="stylesheet" href="css/votehome-m.css" />
    <script src="js/jquery-1.7.2.min.js"></script>
    <script src="js/jqm-1.1.1.min.js"></script>
    <script src="js/tools.js"></script>
    <style>
        body {
            padding: 0;
            margin: 0;
            border: none;
        }
        .pagebg{ padding: 0;background: url("images/backdraw.jpg") no-repeat ; text-align: center;}
    </style>
    <script type="text/javascript">
        $(document).ready(function (e) {
            resize();
            $(".backIndex").live("click", function () {
                window.location.href = "index.html";
            });
            $(".title1").live("click", function () {
                window.location.href = "renqi_g.html";
            });
            $(".title1").live("taphold", function () {
                $("#enterDiv").show();
            });
            init();
            $("#okbtn").live("click",function(){
                var num1=$("#number1").val(),poll1=$("#poll1").val(),
                        num2=$("#number2").val(),poll2=$("#poll2").val(),
                        num3=$("#number3").val(),poll3=$("#poll3").val();
                if(num1==''||num2==''||num3==''||poll1==''||poll2==''||poll3==''){
                    alert("请确认信息的完整性!");
                    return false;
                }
                var strMess="请您确认信息:\u000d第1名:"+num1+"号选手,"+poll1+"票;\u000d第2名:"+num2+"号选手,"+poll2+"票;\u000d第3名:"+num3+"号选手,"+poll3+"票;\u000d"
                if(confirm(strMess)){
                    window.localStorage.setItem("z_number0", num1);
                    window.localStorage.setItem("z_number1", num2);
                    window.localStorage.setItem("z_number2", num3);
                    window.localStorage.setItem("z_poll0", poll1);
                    window.localStorage.setItem("z_poll1", poll2);
                    window.localStorage.setItem("z_poll2", poll3);
                    $("#enterDiv").hide();
                    init();
                }
            });
            $("#cancelbtn").live("click",function(){
                $("#enterDiv").hide();
            });
        });
        function init(){
            var showImgDivs = $(".showimage");
            $.getJSON("./zhuanye.json", function (result) {
                var z_data = result.data;
                $.each(showImgDivs, function (index, items) {
                    var bianhao = window.localStorage.getItem("z_number" + $(items).attr("arow"));
                    var num = "", title = "", befrom = "";
                    $.each(z_data, function (dataIndex, dataItems) {
                        if (dataItems.numbers * 1 == bianhao * 1) {
                            num = dataItems.numbers;
                            title = dataItems.title;
                            befrom = dataItems.befrom;
                        }
                    });
                    $(items).find(".showimg").attr("src", "images/images_z/" + num + ".JPG");
                    $(items).find(".shownum").text(window.localStorage.getItem("z_poll" + $(items).attr("arow")));
                    $(items).find(".numbers").text("编号:" + num);
                    $(items).find(".title").text("姓名:" + title);
                    $(items).find(".befrom").text("景区:" + befrom);
                });
            });
        }
        function resize(){
            var wH=$(window).height();
            $(".pagebg").css({"height":wH+"px","background-size":"100% "+wH+"px"});
        }
    </script>
</head>

<body>
<div id="enterDiv" style="display: none;">
    <div style="position: absolute;opacity: 0.5; background-color:#000;top: 0px;left: 0px;height: 100%;width: 100%;z-index: 888;" ></div>
    <div style="position: absolute;background-color:#106DAC;top: 200px;left: 20%;padding-bottom: 50px;width: 60%;z-index: 999; color: #ffffff; font-size: 22px; border: 1px #fff solid;text-align: center">
        <br><br>
        第1名编号:<input type="number" id="number1">票数:<input type="number" id="poll1"><br><br>
        第2名编号:<input type="number" id="number2">票数:<input type="number" id="poll2"><br><br>
        第3名编号:<input type="number" id="number3">票数:<input type="number" id="poll3"><br><br>
        <div style="width: 100%;height: 30px;text-align: center;" >
            <a id="okbtn" href="javascript:void(0)" style="text-decoration: underline; color: #ffffff">确定</a>&nbsp;&nbsp;&nbsp;
            <a id="cancelbtn" href="javascript:void(0)" style="text-decoration: underline; color: #ffffff">取消</a>
        </div>
    </div>
</div>
<button class="backIndex"></button>
<button data-role="none" class="title1">专业组前三名</button>
<div id="page" class="pagebg">
    <div class="showimage" style="padding-left: 35px" arow="1">
        <div style="position: absolute;"><img src="" class="showimg"/></div>
        <div style="position : relative">
            <div class="shownum">2786票</div>
            <div class="showmask"></div>
            <div class="showinfo">
                    <span class="name">
                        <span class="numbers"></span>
                        <br>
                        <span class="title"></span>
                        <br>
                        <span class="befrom"></span>
                    </span>
            </div>
        </div>
        <div class="desc">第二名</div>
    </div>
    <div class="showimage" arow="0">
        <div style="position: absolute;"><img src="" class="showimg"/></div>
        <div style="position : relative">
            <div class="shownum">2786票</div>
            <div class="showmask"></div>
            <div class="showinfo">
                    <span class="name">
                        <span class="numbers">2</span>
                        <br>
                        <span class="title"></span>
                        <br>
                        <span class="befrom"></span>
                    </span>
            </div>
        </div>
        <div class="desc">最佳人气</div>
    </div>
    <div class="showimage" arow="2">
        <div style="position: absolute;"><img src="" class="showimg"/></div>
        <div style="position : relative">
            <div class="shownum">2786票</div>
            <div class="showmask"></div>
            <div class="showinfo">
                    <span class="name">
                        <span class="numbers"></span>
                        <br>
                        <span class="title"></span>
                        <br>
                        <span class="befrom"></span>
                    </span>
            </div>
        </div>
        <div class="desc">第三名</div>
    </div>
</div>
</body>
</html>
